CC=gcc
CFLAGS=-O3 -funroll-loops -c
LDFLAGS=-O2
LDLIBS=-lm
SOURCES=mAnts.c mCode.c initAnts.c
HEADERS=initAnts.h
OBJECTS=$(addsuffix .o, $(basename ${SOURCES}))
EXECUTABLE=mAnts
EXEFILE=$(addsuffix .exe, $(basename $(EXECUTABLE)))

all: $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)

$(OBJECTS): %.o: %.c $(HEADERS)

clean:
	touch test.log test~
	rm -f *.log *~

realclean: clean
	rm -f $(EXECUTABLE) $(OBJECTS) $(EXEFILE) 

install: $(EXECUTABLE)
	mkdir -p ..\\bin
	cp $(EXEFILE) ../bin/$(EXEFILE)

.PHONY: all clean install
